<?php
// inc/class/baseClass.php
namespace smp;

use smp\Debug;

class Base {

	// Properties ->
	protected static $errno, $error, $trace, $errorpage, $readonly, $secret;

	public static function errno() { return static::$errno; }
	public static function error() { return static::$error; }
	public static function trace() { return static::$trace; }
	public static function errorpage() { return static::$errorpage; }

	// isReadonly ->
	protected static function isReadonly($property) {
		if(static::$readonly and in_array($property, static::$readonly)) {
			return true;
		}
	return false;
	}

	// isSecret ->
	protected static function isSecret($property) {
		if(static::$secret and in_array($property, static::$secret)) {
			return true;
		}
	return false;
	}

	// setTrace ->
	protected static function setTrace($function) { // -!
		if(isset(static::$trace)) { return; }
		static::$trace = Debug::backtrace($function);
	}

	// resetTrace ->
	public static function resetTrace() {
		static::$trace = NULL;
	}

}

?>